home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / DClap / DIconLib.h < prev    next >
Text File  |  1996-07-05  |  1KB  |  61 lines

  1. // DIconLib.h
  2.  
  3. #ifndef _DICONLIB_
  4. #define _DICONLIB_
  5.  
  6. #include "ncbi.h"
  7. #include "DObject.h"
  8. #include "DList.h"
  9.  
  10. class DFile;
  11.  
  12. struct IconStore {
  13.     short id;
  14.     short smalli;
  15.     short    width;
  16.     short    height;
  17.     short    bitmapsize;
  18.     unsigned short bitmap;
  19.     };
  20.  
  21. class DIcon : public DObject
  22. {
  23. public:
  24.     long    fId;
  25.     Boolean fSmall; // mac #icn versus #ICN
  26.     short    fWidth;
  27.     short    fHeight;
  28.     long    fBitmapSize;
  29.     char*    fBitmap;
  30.  
  31.     DIcon();
  32.     DIcon( long id, short width, short height, const char* bitmap, long bitmapsize);
  33.     DIcon( IconStore* store);
  34.     virtual ~DIcon();
  35.     virtual void Draw(Nlm_RecT area);
  36.     virtual void Install( short width, short height, const char* bitmap, long bitmapsize);
  37.     virtual void WriteCode( DFile* iconf);
  38. };
  39.  
  40.  
  41. class DIconList : public DList
  42. {
  43. public:
  44.     DIconList();
  45.     virtual DIcon* IconAt(long index) { return (DIcon*) At(index); }
  46.     virtual DIcon* IconById(long id);
  47.     virtual Boolean Read(char* filename);
  48.     virtual Boolean ReadXbitmapFormat(char* filename); 
  49.     virtual Boolean ReadMacRezFormat(char* filename); 
  50.     virtual void ReadAppIcons();
  51.     virtual void WriteAsCode( char* filename);
  52.     virtual void StoreFromCode( unsigned short* ilist, short nlist = 0);
  53. };
  54.  
  55.  
  56. extern DIconList* gIconList;
  57.  
  58.  
  59.   
  60. #endif
  61.